var express = require('express')
var router = express.Router()
const { getAll, getById, exec } = require('../db')

router.post('/gg_notice', async function (req, res, next) {
  const data = req.body
  console.log(data)
  let sql = `insert into gg_notice values (null, '${data.user_id}','${data.notice_content}',null,'${data.affected_area}')`
  await exec(sql)
  res.send({
    code: 1,
    message: '成功',
  })
})

module.exports = router
